package com.fhzz.service;

import java.util.List;
import java.util.Map;

import org.activiti.engine.runtime.ProcessInstance;

import com.fhzz.model.LeaveApply;


public interface LeaveService {
	/**
	 * 启动工作流
	 * @param apply
	 * @param userid
	 * @param variables
	 * @return
	 */
	public ProcessInstance startWorkflow(LeaveApply apply, String userid, Map<String, Object> variables);
	
	/**
	 * 分页获取部门领导任务
	 * @param userid
	 * @param firstrow
	 * @param rowcount
	 * @return
	 */
	public List<LeaveApply> getPageDeptTask(String userid,int firstrow,int rowcount);
	
	
	public int getAllDeptTask(String userid);
	
	/**
	 * 根据id获取请假的申请
	 * @param id
	 * @return
	 */
	public LeaveApply getleave(int id);
	
	/**
	 * 分页查询人事的任务
	 * @param userid
	 * @param firstrow
	 * @param rowcount
	 * @return
	 */
	public List<LeaveApply> getPageHrTask(String userid,int firstrow,int rowcount);
	
	/**
	 * 获取人事所有的任务
	 * @param userid
	 * @return
	 */
	public int getAllHrTask(String userid);
	
	/**
	 * 获取销假任务列表
	 * @param userid
	 * @param firstrow
	 * @param rowcount
	 * @return
	 */
	public List<LeaveApply> getPageXjTask(String userid,int firstrow,int rowcount);
	
	/**
	 * 获取销假任务总数
	 * @param userid
	 * @return
	 */
	public int getAllXjTask(String userid);
	
	/**
	 * 分页查询可调整的申请
	 * @param userid
	 * @param firstrow
	 * @param rowcount
	 * @return
	 */
	public List<LeaveApply> getPageUpdateApplyTask(String userid,int firstrow,int rowcount);
	
	/**
	 * 获取可调整的申请总数
	 * @param userid
	 * @return
	 */
	public int getAllUpdateApplyTask(String userid);
	
	/**
	 * 完成销假
	 * @param taskid
	 * @param realstart_time
	 * @param realend_time
	 */
	public void completeReportBack(String taskid, String realstart_time, String realend_time);
	
	/**
	 * 调整请假申请
	 * @param taskid
	 * @param leave
	 * @param reappply
	 */
	public void updateComplete(String taskid, LeaveApply leave,String reappply);
	
}
